<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body></body>
</html>

<script>
  var arr1 = [];
  var arr2 = [];
  for (i = 2; i <= 60; i += 2) {
    arr1[arr1.length] = i;
  }
  for (i = 0; i < arr1.length; i += 5) {
    arr2[arr2.length] =
      (arr1[i] + arr1[i + 1] + arr1[i + 2] + arr1[i + 3] + arr1[i + 4]) / 5;
  }
  console.log(arr1);
  console.log(arr2);
</script>
